<!DOCTYPE html>
<html>
{% load staticfiles %}
<head>
    <meta charset="UTF-8">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <title>{% block titile %}个人中心{% endblock %}</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/layout.css' %}">
    {% block custom_css %} {% endblock %}
    <link href="https://cdn.bootcss.com/element-ui/2.0.11/theme-chalk/index.css" rel="stylesheet">


</head>

<body onload='setup()'>
{% block page-sidebar %}
    <div class="page-sidebar">
        <div class="page-sidebar-logo">
            <a href="javascript:;">
                <input readonly unselectable="on" style="border: 0px;font-size:30px;color: white; background: #273754"
                       id="root" value="Loading...">
            </a>
        </div>

        {% block nav %}
            <ul class="page-sidebar-list">
                <li>
                    <h6>
                        <a href="{% url 'userinfo' %}">个人主页</a>
                    </h6>
                </li>

                <li>
                    <h6>
                        <a href="">现货查询</a>
                    </h6>
                </li>

                <li>
                    <h6>
                        <a href="javascript:;">自动交易</a>
                    </h6>
                    <ul class="page-sidebar-select">
                        <li>
                            <p>
                                <a href="./新-自动交易.html">手动交易</a>
                            </p>
                        </li>
                        <li>
                            <p>
                                <a href="./新-程序化交易.html">程序化交易</a>
                            </p>
                        </li>
                    </ul>
                </li>

                <li>
                    <h6>
                        <a href="">套保回测</a>
                    </h6>
                </li>
                <li>
                    <h6>
                        <a href="{% url 'user:kmap' %}">视图</a>
                    </h6>
                </li>
                <li>
                    <h6>
                        <a href="{% url 'user:modifyuserinfo' %}">修改信息</a>
                    </h6>
                </li>

            </ul>
        {% endblock %}

    </div>
{% endblock %}

{% block page-header %}
    <div class="page-header">
        <div class="page-header-box">
            {% if request.user.is_authenticated %}
                <div class="page-header-img">
                    <a href="javascript:;">
                        {#                <img src="./webimages/head-portrait.jpg" alt="个人头像">#}
                        <dt><img width="50px" height="50px" src="{{ MEDIA_URL }}{{ user.image }}"/></dt>
                    </a>
                </div>
                <div class="page-header-list">
                    <span>{{ user.nick_name }}</span>
                    <ul class="page-header-menu">
                        <li>
                            <a href="{% url 'index' %}">首页</a>
                        </li>
                        <li>
                            <a href="{% url 'forget_pwd' %}">修改密码</a>
                        </li>
                        <li>
                            <a href="{% url 'user:modifyuserinfo' %}">修改信息</a>
                        </li>
                        <li>
                            <a href="{% url 'logout' %}">安全退出</a>
                        </li>
                    </ul>
                </div>
            {% else %}

                <div class="page-header-img">

                </div>
                <div class="page-header-list">
                    <span><a href="{% url 'login' %}" style="color: white">请先登陆</a></span>
                    <ul class="page-header-menu">
                        <li>
                            <a href="{% url 'index' %}">首页</a>
                        </li>
                        <li>
                            <a href="{% url 'register' %}">注册</a>
                        </li>
                    </ul>
                </div>
            {% endif %}
        </div>
        <!-- 分界线 -->

    </div>
{% endblock %}

{% block content %}
    <div class="page-container personal-homepage">
        <div class="personal-homepage-top">
            <div class="personal-homepage-images">
                <div class="personal-homepage-img">
                    <img src="{{ MEDIA_URL }}{{ user.image }}" alt="个人头像">
                </div>
                <form action="#" class="personal-homepage-file">
                    <button>更改头像</button>
                    <input type="file" name="head" accept="image/png, image/jpg" title="">
                </form>
            </div>
            <div class="personal-homepage-text">
                <h3>您好！欢迎光临个人信息中心</h3>
                <form action="#" class="personal-homepage-form">
                    <label for="username">账户：</label>
                    <input type="text" name="username" value="{{ user.username }}" disabled="true">

                    |
                </form>
                <form action="#" class="personal-homepage-form">
                    <label for="type">昵称：</label>
                    <input type="text" name="type" value="{{ user.nick_name }}" disabled="true">

                    |
                </form>
                <form action="#" class="personal-homepage-form">
                    <label for="type">电话：</label>
                    <input type="text" name="type" value="{{ user.mobile }}" disabled="true">

                    |
                </form>
            </div>
        </div>
        <ul class="personal-homepage-bottom">
            <li>
                <div class="personal-homepage-left">
                    <div class="personal-homepage-info">
                        <h3 data-name="策略名称1">产品套保回测参数记录</h3>
                        <h6 class="personal-homepage-time">2018-11-06 15:46:04</h6>
                        <p>
                            合约代码：<span>农产品</span>
                            现货数量：<span>10000 spot</span>
                            ID：<span>S0183601</span>
                            调仓周期：<span>11</span>
                            对冲方向：<span>LongHedging</span>
                            数据加载日期：<span>2016-10-06</span>
                            策略开始日期：<span>2016-12-06</span>
                            结束日期：<span>2017-03-06</span>
                        </p>
                    </div>
                    <div class="personal-homepage-progress">
                        <div class="progress">
                            <div>
                                <div style="width: 100%; height: 4px; z-index: 9999; top: 0px; float: left; position: relative;">
                                    <div style="background-color: rgb(68, 68, 255); width: 24%; height: 100%; clear: both; transition: height 0.3s ease 0s; float: left;"></div>
                                </div>
                            </div>
                            <div>24%</div>
                            <div>hold on</div>
                            <div>&nbsp;</div>
                        </div>
                    </div>
                </div>
                <div class="personal-homepage-right">
                    <a href="javascript:;" class="personal-homepage-btn">回测</a>
                    <a href="javascript:;" class="gray">回测结果</a>
                    <a href="javascript:;" class="personal-homepage-edit">编辑</a>
                    <a href="javascript:;" class="personal-homepage-remove">删除</a>
                </div>
            </li>


        </ul>
        <div class="personal-homepage-mask">
            <form method="POST" target="hidden_frame" class="hedging-form">
                <div class="hedging-form-box">
                    <div class="hedging-form-block">
                        <label for="choice">策略选择：</label>
                        <select id="choice" name="choice">
                            <option value="0">请选择</option>
                            <option value="1">策略选择2</option>
                            <option value="2">策略选择3</option>
                            <option value="3">策略选择1</option>
                        </select>
                    </div>
                    <div class="hedging-form-block">
                        <label for="name">策略命名：</label>
                        <input type="text" id="name" name="name"/>
                    </div>
                    <div class="hedging-form-block">
                        <label for="s1">分类：</label>
                        <select id="s1" name="s1">
                            <option value="0">请选择</option>
                        </select>
                    </div>
                    <div class="hedging-form-block">
                        <label for="s2">合约代码：</label>
                        <select id="s2" name="code">
                            <option value="0">请选择</option>
                        </select>
                    </div>
                    <div class="hedging-form-block">
                        <label for="s3">合约代码：</label>
                        <select id="s3" name="section">
                            <option value="0">请选择</option>
                        </select>
                    </div>
                    <div class="hedging-form-block">
                        <label for="s4">合约代码：</label>
                        <select id="s4" name="section2">
                            <option value="0">请选择</option>
                        </select>
                    </div>
                    <div class="hedging-form-block">
                        <label for="title">现货数量：</label>
                        <input type="number" name="title">
                    </div>
                    <div class="hedging-form-block">
                        <label for="content">调仓周期(天)：</label>
                        <input type="number" name="content">
                    </div>
                    <div class="hedging-form-block">
                        <label for="starttime">数据加载日(YYYY-mm-dd)：</label>
                        <input type="date" name="starttime">
                    </div>
                    <div class="hedging-form-block">
                        <label for="strategystartDate">策略开始日期(YYYY-mm-dd)：</label>
                        <input type="date" name="strategystartDate">
                    </div>
                    <div class="hedging-form-block">
                        <label for="endtime">结束日期(YYYY-mm-dd,以交易日为准)：</label>
                        <input type="date" name="endtime">
                    </div>
                    <div class="hedging-form-block">
                        <label for="direction">对冲方向：</label>
                        <select name="direction">
                            <option value="0">请选择</option>
                            <option>持有多头</option>
                            <option>持有空头</option>
                        </select>
                    </div>
                    <div class="commonbtn">
                        <input type="submit" value="提 交">
                        <input type="button" value="关 闭">
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}

{% block page-footer %}
    <div class="page-footer">
        <p>Copyright&copy;2016-2018<input readonly unselectable="on" style="border: 0px;color: #808080;" id="copyright"
                                          value="Loading..."></p>
    </div>
{% endblock %}


<script>
    function start_long_task(name, $target) {
        // add task status elements
        var div = $('<div class="progress"><div></div><div>0%</div><div>...</div><div>&nbsp;</div></div>');
        $target.html(div);

        // create a progress bar
        var nanobar = new Nanobar({
            bg: '#44f',
            target: div[0].childNodes[0]
        });
        // send ajax POST request to start background job
        $.ajax({
            type: 'POST',
            url: '/longtask',
            data: name,
            success: function (data, status, request) {
                console.log(data);
                status_url = request.getResponseHeader('Location');
                update_progress(status_url, nanobar, div[0]);
            },
            error: function () {
                alert('Unexpected error');
            }
        });
    }

    function update_progress(status_url, nanobar, status_div) {
        // send GET request to status URL
        $.getJSON(status_url, function (data) {
            // update UI
            percent = parseInt(data['current'] * 100 / data['total']);
            nanobar.go(percent);
            $(status_div.childNodes[1]).text(percent + '%');
            $(status_div.childNodes[2]).text(data['status']);
            if (data['state'] != 'PENDING' && data['state'] != 'PROGRESS') {
                if ('result' in data) {
                    // show result
                    $(status_div.childNodes[3]).text('Result: ' + data['result']);
                    status_div.parents('li').find('.gray').removeClass('gray').addClass('cur').attr('href', '回测结果页链接+跳转参数');
                }
                else {
                    // something unexpected happened
                    $(status_div.childNodes[3]).text('Result: ' + data['state']);
                }
            }
            else {
                // rerun in 2 seconds
                setTimeout(function () {
                    update_progress(status_url, nanobar, status_div);
                }, 2000);
            }
        });
    }

    $(function () {
        $(document).on('click', '.personal-homepage-btn', function () {
            var title = $(this).parents('li').find('h3').data('name');
            var $target = $(this).parents('li').find('.personal-homepage-progress');
            start_long_task(title, $target);
        });
    });
</script>
<!-- 下拉列表四级联动数据 -->
<script>
    function Dsy() {
        this.Items = {};
    }

    Dsy.prototype.add = function (id, iArray) {
        this.Items[id] = iArray;
    }
    Dsy.prototype.Exists = function (id) {
        if (typeof (this.Items[id]) == "undefined")
            return false;
        return true;
    }

    function change(v) {
        var str = "0";
        for (i = 0; i < v; i++) {
            str += ("_" + (document.getElementById(s[i]).selectedIndex - 1));
        }
        ;
        var ss = document.getElementById(s[v]);
        with (ss) {
            length = 0;
            options[0] = new Option(opt0[v], opt0[v]);
            if (v && document.getElementById(s[v - 1]).selectedIndex > 0 || !v) {
                if (dsy.Exists(str)) {
                    ar = dsy.Items[str];
                    for (i = 0; i < ar.length; i++)
                        options[length] = new Option(ar[i], ar[i]);
                    if (v)
                        options[1].selected = true;
                }
            }
            if (++v < s.length) {
                change(v);
            }
        }
    }

    var dsy = new Dsy();
    dsy.add("0", ["农产品", "贵金属", "有色金属", "化工品", "黑金属", "能源", "金融衍生品"]);
    dsy.add("0_0", ["A.DCE", "B.DCE", "C.DCE", "CF.CZC ", "JD.DCE", "M.DCE", "P.DCE", "OI.CZC", "RM.CZC", "SR.CZC", "Y.DCE", "CS.DCE", "CY.CZC", "AP.CZC"]);
    dsy.add("0_1", ["AU.SHF", "AG.SHF"]);
    dsy.add("0_2", ["NI.SHF", "AL.SHF", "CU.SHF", "PB.SHF", "SN.SHF", "ZN.SHF"]);
    dsy.add("0_3", ["RU.SHF", "BU.SHF", "FG.CZC", "L.DCE", "MA.CZC", "PP.DCE", "TA.CZC", "V.DCE"]);
    dsy.add("0_4", ["I.DCE", "HC.SHF", "J.DCE", "JM.DCE", "RB.SHF", "SF.CZC", "SM.CZC", "ZC.CZC"]);
    dsy.add("0_4_0", ["PB粉", "PB粉矿", "PB块", "PB块矿", "阿特拉斯粉", "阿特拉斯粉矿", "磁铁矿", "粗粉", "粉矿", "国产铁矿石", "海砂", "火箭特粉", "进口铁矿石", "精粉", "卡拉加斯粉", "块矿", "罗布河粉", "麦克粉", "纽曼粉", "纽曼粉矿", "普利粉", "球团矿", "特粉", "铁精粉", "杨迪粉", "杨迪粉矿", "原矿"]);
    dsy.add("0_4_0_0", [" S0183601 61.50%  曹妃甸港,澳大利亚 ",
        " S0183618 61.50%  江阴港,澳大利亚 ",
        " S0183606 61.50%  京唐港,澳大利亚 ",
        " S0202769 61.50%  罗泾港,澳大利亚 ",
        " S0183620 61.50%  南通港,澳大利亚 ",
        " S0202790 61.50%  太仓港,澳大利亚 ",
        " S0183615 61.50%  镇江港,澳大利亚 "]);
    dsy.add("0_4_0_1", [" S5707573 61%  曹妃甸港,澳大利亚 ",
        " S5707543 61%  防城港,澳大利亚 ",
        " S5707552 61%  江阴港,澳大利亚 ",
        " S5707586 61%  京唐港,澳大利亚 ",
        " S0110172 61.50%  连云港,澳大利亚 ",
        " S5707534 61%  南通港,澳大利亚 ",
        " S0174655 61.50%  青岛港,澳大利亚 ",
        " S0110182 61.50%  日照港,澳大利亚 ",
        " S5707546 61%  太仓港,澳大利亚 ",
        " S0167713 61.50%  天津港,澳大利亚 ",
        " S5707562 61%  湛江港,澳大利亚 ",
        " S5707514 61%  镇江港,澳大利亚 "]);
    dsy.add("0_4_0_2", [" S0183600 62.50%  曹妃甸港,澳大利亚 ",
        " S0183617 62.50%  江阴港,澳大利亚 ",
        " S0202753 62.50%  京唐港,澳大利亚 ",
        " S0202768 62.50%  罗泾港,澳大利亚 ",
        " S0202782 62.50%  南通港,澳大利亚 ",
        " S0202789 62.50%  太仓港,澳大利亚 ",
        " S0183614 62.50%  镇江港,澳大利亚 "]);
    dsy.add("0_4_0_3", [" S5707574 62%  曹妃甸港,澳大利亚 ",
        " S5707553 62%  江阴港,澳大利亚 ",
        " S5707587 62%  京唐港,澳大利亚 ",
        " S0110173 62.50%  连云港,澳大利亚 ",
        " S5707535 62%  南通港,澳大利亚 ",
        " S0174656 62.50%  青岛港,澳大利亚 ",
        " S0110183 62.50%  日照港,澳大利亚 ",
        " S5707547 62%  太仓港,澳大利亚 ",
        " S0167714 62.50%  天津港,澳大利亚 ",
        " S5707563 62%  湛江港,澳大利亚 ",
        " S5707517 62%  镇江港,澳大利亚 ",
        " S5707531 62%  岚山港,澳大利亚 "]);
    dsy.add("0_4_0_4", [" S0202745 57%  曹妃甸港,澳大利亚 ",
        " S0202759 57%  京唐港,澳大利亚 "]);
    dsy.add("0_4_0_5", [" S5707589 58%  京唐港,澳大利亚 "]);
    dsy.add("0_4_0_6", [" S5707512 59%  镇江港,伊朗 "]);
    dsy.add("0_4_0_7", [" S0110163 65%  北仑港,巴西 ",
        " S0183605 63%  曹妃甸港,巴西 ",
        " S5707576 64%  曹妃甸港,巴西 ",
        " S0202750 63%  曹妃甸港,南非 ",
        " S0183611 63%  防城港,巴西 ",
        " S0183616 63%  江阴港,巴西 ",
        " S0202764 63%  京唐港,南非 ",
        " S0183608 63%  连云港,巴西 ",
        " S0202776 63%  罗泾港,巴西 ",
        " S0183619 63%  南通港,巴西 ",
        " S0202796 63%  太仓港,巴西 ",
        " S0167715 63.50%  天津港,巴西 ",
        " S0183613 63%  镇江港,巴西 "]);
    dsy.add("0_4_0_8", [" S5707571 52%  曹妃甸港,印度 ",
        " S5707570 53%  曹妃甸港,印度 ",
        " S5707569 56%  曹妃甸港,印度 ",
        " S5707568 59%  曹妃甸港,印度 ",
        " S5707567 61%  曹妃甸港,印度 ",
        " S0202752 63%  曹妃甸港,印度 ",
        " S0202751 63.50%  曹妃甸港,印度 ",
        " S5707566 63.50%  曹妃甸港,印度 ",
        " S5707542 64.50%  防城港,巴西 ",
        " S5707551 63.50%  江阴港,巴西 ",
        " S5707557 58%  江阴港,印度 ",
        " S5707556 61%  江阴港,印度 ",
        " S5707555 62%  江阴港,印度 ",
        " S5707554 63.50%  江阴港,印度 ",
        " S5707583 65%  京唐港,巴西 ",
        " S5707591 48%  京唐港,马来西亚 ",
        " S5707590 49%  京唐港,马来西亚 ",
        " S5707582 53%  京唐港,印度 ",
        " S5707581 56%  京唐港,印度 ",
        " S5707580 58%  京唐港,印度 ",
        " S5707579 61%  京唐港,印度 ",
        " S5707578 62%  京唐港,印度 ",
        " S0202765 63%  京唐港,印度 ",
        " S0183607 63.50%  京唐港,印度 ",
        " S5707577 63.50%  京唐港,印度 ",
        " S0174658 52%  连云港,印度 ",
        " S0174657 54%  连云港,印度 ",
        " S0110171 58%  连云港,印度 ",
        " S0110170 59%  连云港,印度 ",
        " S0110169 60%  连云港,印度 ",
        " S0110168 61%  连云港,印度 ",
        " S0110167 62%  连云港,印度 ",
        " S0205368 63%  连云港,印度 ",
        " S0205369 63.50%  连云港,印度 ",
        " S0202778 65%  罗泾港,南非 ",
        " S5707533 63.50%  南通港,巴西 ",
        " S5707532 65%  南通港,巴西 ",
        " S5707541 56%  南通港,印度 ",
        " S5707540 58%  南通港,印度 ",
        " S5707539 60%  南通港,印度 ",
        " S5707538 61%  南通港,印度 ",
        " S5707537 62%  南通港,印度 ",
        " S0110154 64.50%  青岛港,巴西 ",
        " S0110162 58%  青岛港,印度 ",
        " S0110161 59%  青岛港,印度 ",
        " S0110160 60%  青岛港,印度 ",
        " S0110159 61%  青岛港,印度 ",
        " S0110158 62%  青岛港,印度 ",
        " S0110157 63%  青岛港,印度 ",
        " S0110156 63.50%  青岛港,印度 ",
        " S0110185 64.50%  日照港,巴西 ",
        " S0174660 52%  日照港,印度 ",
        " S0174659 54%  日照港,印度 ",
        " S0110181 58%  日照港,印度 ",
        " S0110180 59%  日照港,印度 ",
        " S0110179 60%  日照港,印度 ",
        " S0110178 61%  日照港,印度 ",
        " S0110177 62%  日照港,印度 ",
        " S0110176 63%  日照港,印度 ",
        " S0110175 63.50%  日照港,印度 ",
        " S5707550 64%  太仓港,南非 ",
        " S0202798 65%  太仓港,南非 ",
        " S0174772 52%  天津港,印度 ",
        " S0174771 54%  天津港,印度 ",
        " S0167723 56%  天津港,印度 ",
        " S0167722 58%  天津港,印度 ",
        " S0167721 59%  天津港,印度 ",
        " S0167720 60%  天津港,印度 ",
        " S0167719 61%  天津港,印度 ",
        " S0167718 62%  天津港,印度 ",
        " S0167717 63%  天津港,印度 ",
        " S0167716 63.50%  天津港,印度 ",
        " S5707564 64%  湛江港,巴西 ",
        " S5707561 58%  湛江港,印度 ",
        " S5707560 59%  湛江港,印度 ",
        " S5707559 60%  湛江港,印度 ",
        " S5707558 63.50%  湛江港,印度 ",
        " S5707565 60%  湛江港,印尼 ",
        " S5707513 56.92%  镇江港,澳大利亚 ",
        " S5707510 60%  镇江港,巴西 ",
        " S5707515 64%  镇江港,巴西 ",
        " S5707516 58%  镇江港,印度 ",
        " S5707520 62%  岚山港,巴西 ",
        " S5707530 64%  岚山港,巴西 ",
        " S5707518 58%  岚山港,印度 ",
        " S5707526 60%  岚山港,印度 ",
        " S5707528 63.50%  岚山港,印度 "]);
    dsy.add("0_4_0_9", [" S5704664 62% 干基铁精矿含税价  "]);
    dsy.add("0_4_0_10", [" S5707511 57%  镇江港,印尼 "]);
    dsy.add("0_4_0_11", [" S5707575 57.50%  曹妃甸港,澳大利亚 "]);
    dsy.add("0_4_0_12", [" S5704665 62% 干基粉矿到岸价  "]);
    dsy.add("0_4_0_13", [" S5707544 65%  防城港,乌克兰 "]);
    dsy.add("0_4_0_14", [" S0202746 65%  曹妃甸港,巴西 ",
        " S0202767 65%  防城港,巴西 ",
        " S0202760 65%  京唐港,巴西 ",
        " S0202731 65%  连云港,巴西 ",
        " S0202775 65%  罗泾港,巴西 ",
        " S0202787 65%  南通港,巴西 ",
        " S0202726 65%  青岛港,巴西 ",
        " S0202795 65%  太仓港,巴西 ",
        " S0202741 65%  天津港,巴西 ",
        " S0202803 65%  镇江港,巴西 "]);
    dsy.add("0_4_0_15", [" S0202747 65%  曹妃甸港,巴西 ",
        " S0202749 64%  曹妃甸港,南非 ",
        " S0183612 65%  防城港,巴西 ",
        " S5707545 60%  防城港,印尼 ",
        " S5707584 64%  京唐港,巴西 ",
        " S0202763 64%  京唐港,南非 ",
        " S0202777 65%  罗泾港,巴西 ",
        " S0202788 65%  南通港,巴西 ",
        " S0202797 65%  太仓港,巴西 ",
        " S0202804 65%  镇江港,巴西 ",
        " S5707521 63.60%  岚山港,巴西 "]);
    dsy.add("0_4_0_16", [" S0202744 57%  曹妃甸港,澳大利亚 ",
        " S0202758 57%  京唐港,澳大利亚 ",
        " S0202774 57%  罗泾港,澳大利亚 ",
        " S0183609 57%  青岛港,澳大利亚 ",
        " S0202734 57%  日照港,澳大利亚 ",
        " S0202740 57%  天津港,澳大利亚 "]);
    dsy.add("0_4_0_17", [" S0202742 61%  曹妃甸港,澳大利亚 ",
        " S0202779 61%  江阴港,澳大利亚 ",
        " S0202754 61%  京唐港,澳大利亚 ",
        " S0202728 61%  连云港,澳大利亚 ",
        " S0202770 61%  罗泾港,澳大利亚 ",
        " S0202783 61%  南通港,澳大利亚 ",
        " S0202725 61%  青岛港,澳大利亚 ",
        " S0202732 61%  日照港,澳大利亚 ",
        " S0202791 61%  太仓港,澳大利亚 ",
        " S0202736 61%  天津港,澳大利亚 ",
        " S0202799 61%  镇江港,澳大利亚 "]);
    dsy.add("0_4_0_18", [" S0183604 62.50%  曹妃甸港,澳大利亚 ",
        " S0202780 62.50%  江阴港,澳大利亚 ",
        " S0202727 62.50%  连云港,澳大利亚 ",
        " S0202771 62.50%  罗泾港,澳大利亚 ",
        " S0202784 62.50%  南通港,澳大利亚 ",
        " S0202724 62.50%  青岛港,澳大利亚 ",
        " S0202792 62.50%  太仓港,澳大利亚 ",
        " S0202737 62.50%  天津港,澳大利亚 ",
        " S0202800 62.50%  镇江港,澳大利亚 "]);
    dsy.add("0_4_0_19", [" S5707572 62.50%  曹妃甸港,澳大利亚 ",
        " S5707585 62.50%  京唐港,澳大利亚 ",
        " S0110184 62%  日照港,澳大利亚 ",
        " S5707549 62%  太仓港,澳大利亚 "]);
    dsy.add("0_4_0_20", [" S0202743 57%  曹妃甸港,澳大利亚 ",
        " S0202757 57%  京唐港,澳大利亚 "]);
    dsy.add("0_4_0_21", [" S0175649 63% 含税现金出厂价 徐州 ",
        " S0175647 63% 干基含税承兑出厂价 淄博 ",
        " S0175648 63% 干基含税承兑出厂价 沂水 ",
        " S0175653 62% 含税现金出厂价 鄂州 ",
        " S0175645 62% 含税出厂价 沙河 ",
        " S0175643 62% 含税承兑出厂价 承德 ",
        " S0175651 62% 干基含税现汇出厂价 铜陵 ",
        " S0175652 62% 干基含税现汇出厂价 繁昌 ",
        " S0175644 62% 不含税出厂价 迁安 "]);
    dsy.add("0_4_0_22", [" S5707548 57%  太仓港,澳大利亚 "]);
    dsy.add("0_4_0_23", [" S0033121 66% 湿基不含税 唐山 ",
        " S0033118 66% 湿基不含税 灵丘 ",
        " S0175568 66% 湿基不含税 建平 ",
        " S0175570 66% 湿基不含税 朝阳 ",
        " S0175569 66% 湿基不含税 北票 ",
        " S0167818 66% 干基含税出厂价 唐山 ",
        " S0167819 66% 干基含税出厂价 抚顺 ",
        " S0175616 66% 干基含税承兑到厂价 津西钢铁 ",
        " S0175617 66% 干基含税承兑到厂价 承钢 ",
        " S0033127 66% 干基含税 遵化 ",
        " S0175567 66% 干基含税 通化 ",
        " S0033115 66% 干基含税 迁西 ",
        " S0033114 66% 干基含税 迁安 ",
        " S0033125 66% 干基含税 黎城 ",
        " S0033128 66% 干基含税 北京 ",
        " S0175612 66% 干基不含税出厂价 邯钢 ",
        " S0033124 66% 干基不含税 邯邢 ",
        " S0175621 66% 本地干基含税到厂价 通钢 ",
        " S0175618 66% 本地干基含税承兑到厂价 凌钢 ",
        " S0175586 65.50% 湿基不含税 泰安 ",
        " S0175611 65% 湿基不含税现汇自提价 鞍山宝得 ",
        " S0175574 65% 湿基不含税 营口 ",
        " S0175581 65% 湿基不含税 清徐 ",
        " S0033123 65% 湿基不含税 娄烦 ",
        " S0175571 65% 湿基不含税 辽阳 ",
        " S0175575 65% 湿基不含税 海城 ",
        " S0175580 65% 湿基不含税 固阳 ",
        " S0033119 65% 湿基不含税 繁峙 ",
        " S0175576 65% 湿基不含税 丹东 ",
        " S0033122 65% 湿基不含税 代县 ",
        " S0175572 65% 湿基不含税 本溪 ",
        " S0175573 65% 湿基不含税 鞍山 ",
        " S0175610 65% 干基含税现汇到厂价 本钢 ",
        " S0175628 65% 干基含税到厂价 涟钢 ",
        " S0175627 65% 干基含税到厂价 福建三明 ",
        " S0175588 65% 干基含税 淄博 ",
        " S0175589 65% 干基含税 沂水 ",
        " S0175597 65% 干基含税 铜陵 ",
        " S0175596 65% 干基含税 庐江 ",
        " S0175594 65% 干基含税 霍邱 ",
        " S0175601 65% 干基含税 怀集 ",
        " S0175598 65% 干基含税 繁昌 ",
        " S0175578 65% 干基含税 承德 ",
        " S0175619 65% 本地干基含税到厂价 新抚钢 ",
        " S0175626 65% 本地干基含税到厂价 马钢 ",
        " S0175620 65% 本地干基含税到厂价 北台 ",
        " S0175623 65% 本地干基含税承兑到厂价 莱钢 ",
        " S0033116 64% 湿基不含税 涞源 ",
        " S0033117 64% 湿基不含税 武安 ",
        " S0033126 64% 湿基不含税 沙河 ",
        " S0175630 64% 干基含税到厂价 柳钢 ",
        " S0175599 64% 干基含税 马鞍山 ",
        " S0175587 64% 干基含税 莱芜 ",
        " S0175604 64% 干基含税 河源 ",
        " S0175622 64% 本地干基含税承兑到厂价 济钢 ",
        " S0175584 63% 干基含税 大冶 ",
        " S0175608 63% 干基不含税 昌江 ",
        " S0175629 60% 干基含税到厂价 昆钢 ",
        " S0175606 55% 不含税 昌江 ",
        " S0175607 53% 不含税 昌江 ",
        " S0175602 51%  韶关 ",
        " S0175603 50%  韶关 "]);
    dsy.add("0_4_0_24", [" S0183602 58%  曹妃甸港,澳大利亚 ",
        " S0202781 58%  江阴港,澳大利亚 ",
        " S0202755 58%  京唐港,澳大利亚 ",
        " S0202729 58%  连云港,澳大利亚 ",
        " S0202772 58%  罗泾港,澳大利亚 ",
        " S0202785 58%  南通港,澳大利亚 ",
        " S0110155 58%  青岛港,澳大利亚 ",
        " S0202733 58%  日照港,澳大利亚 ",
        " S0202793 58%  太仓港,澳大利亚 ",
        " S0202738 58%  天津港,澳大利亚 ",
        " S0202801 58%  镇江港,澳大利亚 "]);
    dsy.add("0_4_0_25", [" S5707588 58%  京唐港,澳大利亚 ",
        " S5707536 58%  南通港,澳大利亚 "]);
    dsy.add("0_4_0_26", [" S0175636 32% 不含税市场价 本溪 ",
        " S0175635 31% 不含税市场价 抚顺 ",
        " S0175640 30%  涞源 ",
        " S0175641 30%  沙河 ",
        " S0175637 30% 不含税市场价 辽阳 ",
        " S0175633 30% 不含税市场价 朝阳 ",
        " S0175639 30% 不含税出厂价 唐山 "]);
    dsy.add("0_5", ["SC.INE"]);
    dsy.add("0_6", ["IC.CFE", "IF.CFE", "IH.CFE", "TF.CFE", "T.CFE"])
</script>
<script>
    var s = ["s1", "s2", "s3", "s4"];
    var opt0 = ["分类", "合约代码", "空", "空"];

    function setup() {
        for (i = 0; i < s.length - 1; i++)
            document.getElementById(s[i]).onchange = new Function("change(" + (i + 1) + ")");
        change(0);
    }
</script>
</body>

<script src="{% static 'js/jquery-1.12.4.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/ajax_data.js' %}" type="text/javascript"></script>
<script src="{% static 'js/layout.js' %}" type='text/javascript'></script>
<!-- 进度条js -->
<script src="//cdnjs.cloudflare.com/ajax/libs/nanobar/0.2.1/nanobar.min.js"></script>
{% block custom_js %}{% endblock %}
</html>